testsuite: Fix a few memory leaks
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Sep 2021 12:24:36 +0000 (08:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Sep 2021 12:29:45 +0000 (08:29 -0400)
These are keeping the asan build in ci from passing.

testsuite/gtk/fnmatch.c
testsuite/gtk/texthistory.c

index e16bdae016bc269ffb304e7a895a79d439398c7c..25bbc7b0e610f10d441ec03542b745ce75c82aa3 100644 (file)
@@ -165,12 +165,14 @@ main (int argc, char *argv[])
     {
       char *path = g_strdup_printf ("/fnmatch/test%d", i);
       g_test_add_data_func (path, &tests[i], test_fnmatch);
+      g_free (path);
     }
 
   for (int i = 0; i < G_N_ELEMENTS (citests); i++)
     {
       char *path = g_strdup_printf ("/ci-glob/test%d", i);
       g_test_add_data_func (path, &citests[i], test_ci_glob);
+      g_free (path);
     }
 
   return g_test_run ();
index c64c803083d0c8e674da62002c5c22ea8e94eac1..cca4008196320cf739bb552b040a3246529950b2 100644 (file)
@@ -602,6 +602,8 @@ test14 (void)
   run_test (commands, G_N_ELEMENTS (commands), 0);
 
   g_free (fill);
+  g_free (fill_after);
+  g_free (fill_after_2);
 }
 
 int